import { Move2DServiceImpl } from "shared/modules/act/service/Move2DServiceImpl";

import { characterStateClient, move2DClient } from "./clientLib";
import Log4R from "shared/component/log/Log4R";


const loginfo = Log4R.getLog('info');
/** 移动控制改变，玩家或者AI有移动的尝试时触发 */
move2DClient.onMoveControlChange((humanModel, control) => {
    characterStateClient.setMoveControl(humanModel, control)
})
move2DClient.onStateChangeChange((humanModel, state) => {
    loginfo?.info('onStateChangeChange', state)
    characterStateClient.computeState({
        state: state,
        humanModel
    })
})